package com.wondream.myframework.design_pattern.strategy.loan;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;

@AllArgsConstructor
@Getter
public enum FlowTemplateEnum {

    FLOW_TEMPLATE_DEFAULT("10000", "默认模板"),
    FLOW_TEMPLATE_10001("10001", "模板10001"),
    ;

    private String flowId;
    private String desc;

    public static FlowTemplateEnum getFlowTemplateByFlowId(String flowId){
        for (FlowTemplateEnum flowTemplateEnum : FlowTemplateEnum.values()) {
            if(StringUtils.equals(flowTemplateEnum.getFlowId(), flowId)){
                return flowTemplateEnum;
            }
        }
        return null;
    }


}
